<template>
  <!--页面底部-->
  <div class="">
    <div style="width: 100%;height: 100%;">
      <el-backtop :bottom="60"></el-backtop>
    </div>
    <div class="navbar navbar-fixed-bottom border-top" id="footer">
      <p style="text-align:center;color: white;font-size: 18px" class="mt-5 mb-5">
        <span class="glyphicon glyphicon glyphicon-copyright-mark" aria-hidden="true"></span>
        版权归&nbsp;{{Author}}&nbsp;所有&nbsp;&nbsp;
        <br class="visible-xs"/>
        Copyright&nbsp;©&nbsp;{{initialYear}}-{{currentYear}}
      </p>
    </div>
  </div>
</template>

<script>
export default {
  name: "myfooter",
  data(){
    return {
      Author:'CST19076',
      initialYear:'2022',
      currentYear:''
    }
  },
  methods: {
    getYear(){
      let date = new Date();
      let year = date.getFullYear(); // 年
      this.currentYear = `${year}`;
    }
  },
  mounted() {
    this.getYear();
  }
}
</script>

<style scoped>
#footer {
  display: table;
  width: 100%;
  /* Set the fixed height of the footer here */
  background-image: linear-gradient(to top, #051937, #1b253e, #2c3245, #3d404b, #4d4e52);
  padding: 10px 30px 0px 30px;
  height:50px;
  z-index: 0;
}
#footer .p{
  margin: 0 0 5px;
}
</style>
